home *** CD-ROM | disk | FTP | other *** search
/ Aminet 43 / Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso / Aminet / game / role / eyangband.lha / EyAngband031b / help / macro.txt < prev    next >
Text File  |  2001-04-16  |  10KB  |  181 lines

  1.  
  2. ======================= Preferences, Macros and Keymaps  ======================
  3.  
  4.      Once you've played Angband for a while, you may decide to customize 
  5. commands and various other things to better suit your tastes.  
  6.      The first thing you'll discover a use for are keymaps and macros.  They 
  7. can be set up relatively easily, and allow you to perform common tasks with a 
  8. single keystroke.  Setting and changing ASCII (textual symbol) preferences 
  9. works similarly.
  10.      Some people also wind up editing user preference files directly, which 
  11. gives them considerable control over commands, graphics, and various other 
  12. things.
  13.  
  14.  
  15. === An Introduction to Macros and Keymaps ===
  16.  
  17.      Necromancers are forever casting spell "a", Magic Bolt, in spellbook 
  18. "a", Beginner's Curses.  In both keysets, that's "maa", plus "*" to enter 
  19. targeting mode, and finally "t" to target.  Wouldn't it be nice if you could 
  20. do all this with a single keypress?  
  21.      You can.  Choose an unused command (we shall pick "'" by way of example).
  22. Bring up the macro/keymap screen by typing "@".  Press "8" to create a keymap, 
  23. and the game will ask you for a keypress.  Type "'".  When you press Return, 
  24. you shift to the action field, where you input all the commands you want "'" 
  25. to perform when pressed.  In this case, you would enter:  "maa*t", and press 
  26. return.  Now save your new keymap by typing "6", and either allow the game to 
  27. choose your character's name for the preference file, or (if you want all of 
  28. your characters to use the same keymap) save to "user.prf".
  29.  
  30.      This is only the beginning.  What you can do with a spell, you can do 
  31. with arrows, Rods of Trap Location, resting, activating the Phial, searching; 
  32. all sorts of command combinations can profitably be keymapped.  Keymaps are 
  33. even more flexible when used in combination with object inscriptions - see the 
  34. help file "objs-mon.txt".
  35.  
  36. === User Pref Files ===
  37.  
  38.         Angband allows you to change various aspects of the game to suit
  39. your tastes.  You may define keymaps (changing the way Angband maps your
  40. keypresses to underlying commands), create macros (allowing you to map a
  41. single keypress to a series of keypresses), modify the visuals (allowing
  42. you to change the appearance of monsters, objects, or terrain features),
  43. change the colors (allowing you to make a given color brighter, darker,
  44. or even completely different), or set options (turning them off or on).
  45.  
  46.         Angband stores your preferences in files called "user pref files",
  47. which contain comments and "user pref commands", which are simple strings
  48. describing one aspect of the system about which the user has a preference.
  49. There are many ways to load a user pref file, and in fact, some of these
  50. files are automatically loaded for you by the game.  All of the files are
  51. kept in the "lib/user/" directory, though you may have to use one of the
  52. command line arguments to redirect this directory, especially on multi-user
  53. systems.  You may also enter single user pref commands directly, using the
  54. special "Enter a user pref command" command, activated by "double quote".
  55. You may have to use the "redraw" command (^R) after changing certain of
  56. the aspects of the game, to allow Angband to adapt to your changes.
  57.  
  58.         When the game starts up, after you have loaded an old character,
  59. or created a new character, some user pref files are loaded automatically.
  60. First, the "pref.prf" file is loaded.  This file contains some user pref
  61. commands which will work on all platforms.  Then one of "font-xxx.prf"
  62. (for normal usage) or "graf-xxx.prf" (for bitmap usage) is loaded.  These
  63. files contain attr/char changes to allow the monsters, objects, and/or
  64. terrain features to look "better" on your system.  Then the "pref-xxx.prf"
  65. file is loaded.  This file contains pre-defined system specific stuff
  66. (macros, color definitions, etc).  Then, the "user-xxx.prf" file is loaded.
  67. This file contains user-defined system specific stuff.  The "user-xxx.prf"
  68. file is used as the "default" user pref file in many places.  The "xxx" is
  69. the "system suffix" for your system, taken from the "main-xxx.c" file which
  70. was used to generate your executable.  Finally, the "Race.prf", "Class.prf",
  71. and "Name.prf" files are loaded, where "Race", "Class", and "Name" are
  72. replaced by the actual race, class, and name of the current character.
  73.  
  74.         Several commands allow you to both load existing user pref files,
  75. create new user pref files, append information to existing user pref files,
  76. and/or interact with various of the user preferences in a more intuitive
  77. way than the user pref commands allow.  The commands include "Interact with
  78. macros" (@), "Interact with visuals" (%), and "Interact with colors" (&),
  79. described below.
  80.  
  81.  
  82. --- User Pref Files (Macros) ---
  83.  
  84.         The "Interact with macros" command allows you to define or remove
  85. "macros", which are mappings from a single logical keypress to a sequence
  86. of keypresses, allowing you to use special keys on the keyboard, such as
  87. function keys or keypad keys, possibly in conjunction with modifier keys,
  88. to "automate" repetitive multi-keypress commands that you use a lot.
  89.  
  90.         Since macros represent keypress sequences, and not all keypresses
  91. have a printable representation, macro triggers and actions must often be
  92. "encoded" into a human readable form.  This is done using several types
  93. of encoding, including "\xHH" for character number HH in hexadecimal, "\e"
  94. for the "escape" code, "\n" for the "newline" code, "\r" for the "return"
  95. code, "\s" for the "space" code, "\\" for backslash, "\^" for caret, and
  96. "^X" for the code for any "control" key "ctrl-X".  Note that the "action"
  97. of a macro will not be checked against other macro triggers (unless the
  98. macro action contains a "control-backslash"), so you cannot make infinite
  99. loops.  You may specify extremely long macros, but you are limited in
  100. length by the underlying input mechanisms, which in general limit you
  101. to about 1024 keys in both triggers and actions.
  102.  
  103.         The special "\" command (which must be encoded in macros as "\\")
  104. is very useful in macros, since it bypasses all keymaps and allows the next
  105. keystroke to be considered a command in the underlying Angband command set.
  106. For a list of the Angband command set, see the "cmdlist.txt" help file.
  107. For example, a macro which maps Shift-KP6 to "\" + "." + "6" will induce
  108. the "run east" behavior, regardless of what keyset the user has chosen, and
  109. regardless of what keymaps have been defined.
  110.  
  111.     Macros can be specified in user pref files as a pair of lines, one
  112. of the form "A:<str>", which defines the encoded macro action, and one of
  113. the form "P:<str>", which defines the encoded macro trigger.
  114.  
  115.  
  116. --- User Pref Files (Keymaps) ---
  117.  
  118.         The "Interact with macros" command also allows you to define
  119. "keymaps", which are vaguely related to macros.  A keymap maps a single
  120. keypress to a series of keypresses, which bypass both other keymaps and
  121. any macros.  Angband uses keymaps to map the original and the roguelike
  122. keysets to the underlying command set, and allows the user to modify or
  123. add keymaps of their own.  Note that all keymap actions must be specified
  124. using underlying commands, not keypresses from the original or roguelike
  125. keysets.  The original keyset is almost identical to the underlying keyset,
  126. except that "numbers" are mapped to ";" plus a direction, "5" is mapped to
  127. ",", and a few control-keys are mapped to various things.  See "command.txt"
  128. for the full set of underlying commands.  Some uses for keymaps include the
  129. ability to "disable" a command by mapping it to "\x00", 
  130.  
  131.     Keymaps can be specified in user pref files as lines of the form
  132. "M:<T> <key> <str>", where <T> is the keyset (0/1 for original/roguelike),
  133. <key> is the encoded trigger key, and <str> is the encoded keymap action.
  134.  
  135.  
  136. --- User Pref Files (Visuals) ---
  137.  
  138.         You can use the "Interact with visuals" command to change various
  139. visual information, currently including the choice of what attr/char values
  140. are used to represent various monsters, objects, or terrain features.  Note
  141. that in combination appropriate support in "main-xxx.c", and with the use of
  142. the "use_graphics" flag, you may be able to specify that "graphic bitmaps"
  143. should be used instead of normal "colored characters" for various things.
  144.  
  145.         When interactively modifying the attr/char values for monsters,
  146. objects, or terrain features, pressing "n" or "N" will change which entry
  147. you are changing, pressing "a" or "A" will rotate through the available
  148. attr values, and pressing "c" or "C" will rotate though the available char
  149. values.  Note that attr/char values with the "high bit" set may induce the
  150. display of special "graphic" pictures if the "use_graphics" flag is set,
  151. and your system supports the "use_graphics" flag.
  152.  
  153.         Note that this command can be abused in various ways, and if you
  154. must do so, remember that you are only cheating yourself.
  155.  
  156.     Keymaps can be specified in user pref files as line of the form
  157. "R:<N>:<A>/<C>" or "K:<N>:<A>/<C>" or "F:<N>:<A>/<C>" or "U:<N>:<A>/<C>".
  158.  
  159.  
  160. --- User Pref Files (Colors) ---
  161.  
  162.         The "Interact with colors" command allows you to change the actual
  163. internal values used to display various colors.  This command may or may
  164. not have any effect on your machine.  Advanced machines may allow you to
  165. change the actual RGB values used to represent each of the 16 colors used
  166. by Angband, and perhaps even allow you to define new colors which are not
  167. currently used by Angband.
  168.  
  169.     Colors can be specified in user pref files as line of the form
  170. "V:<N>:<V>:<R>:<G>:<B>".
  171.  
  172.  
  173. --- User Pref Files (Options) ---
  174.  
  175.         The "Interact with options" command allows you to turn options
  176. on or off.  You may turn options off or on using the user pref commands
  177. of the form "X:O:<option>" or "Y:O:<option>" respectively for regular
  178. options, and "X:B:<option>" or "Y:B:<option>" respectively for birth
  179. options.
  180.  
  181.